package com.dubito.pattern.接口隔离原则;

/**
 * @author liliang
 * @date 2020/8/26.
 */
public class TestISP {

    public static void main(String[] args) {

        // 获取门户接口对应的实例,该对象只能使用 getOrder() 方法
        IOrderForPortal op = Order.getOrderForPortal();
        System.out.println(op.getOrder());

        // 获取外部系统接口对应的实例,该对象只能使用 insertOrder() 方法
        IOrderForOtherSys os = Order.getOrderForOtherSys();
        os.insertOrder();

        IOrderForAdmin oa = Order.getOrderForAdmin();
        System.out.println(oa.getOrder());
        oa.insertOrder();
        oa.updateOrder();
        oa.deleteOrder();
    }
}
